
//
//  OAMeetDetailsVC.m
//  OA项目
//
//  Created by innofive on 2018/4/17.
//  Copyright © 2018年 inno. All rights reserved.
//

#import "OAMeetDetailsVC.h"
#import "OAApprovelistCell.h"
#import "OAApproveRejectedVC.h"
@interface OAMeetDetailsVC ()

@end

@implementation OAMeetDetailsVC

- (void)viewDidLoad {
    [super viewDidLoad];

    NSArray *arr = @[@{@"name1":@"状态",@"name2":@"待审批"},
                     @{@"name1":@"申请人",@"name2":@"小员"},
                     @{@"name1":@"主题",@"name2":@"会议申请"},
                     @{@"name1":@"内容",@"name2":@"2017年底总结大会"},
                     @{@"name1":@"起始日期",@"name2":@"2017-11-29 09:00"},
                     @{@"name1":@"终止日期",@"name2":@"2017-11-30 09:00"},
                     @{@"name1":@"合计",@"name2":@"2小时"},
                     @{@"name1":@"参与者",@"name2":@"全公司员工"},
                     @{@"name1":@"",@"name2":@""},
                     @{@"name1":@"附件",@"name2":@""},
                     @{@"name1":@"",@"name2":@""},
                     @{@"name1":@"已审批人",@"name2":@"无"},
                     @{@"name1":@"下一审批人",@"name2":@"小小"},
                     @{@"name1":@"",@"name2":@""},
                     @{@"name1":@"抄送",@"name2":@""},
                     @{@"name1":@"",@"name2":@""},
                     ];
    
    [self.dataArr addObjectsFromArray:arr];
}

-(void)onLoadViewByWillAppear:(UIView *)view
{
    [self.tableView config:^(UITableView *tableView) {
        [tableView setSeparatorMan];
    }];
}

#pragma mark - 点击方法

-(void)onClick:(UIButton *)button
{
    
    OAApproveRejectedVC *vc =[OAApproveRejectedVC rejectedVCForType:button.tag==20?openVCTypeOne:openVCTypeTwo];
    
    [self presentWindowToVC:vc IsNaV:NO Completion:^{
        
    }];
}

-(void)onSetSubviewSELForCell:(BaseTableViewCell *)cell forTableView:(UITableView *)tableView forIndexPath:(NSIndexPath *)indexPath
{
    if (indexPath.row==12||indexPath.row==7||indexPath.row==11||indexPath.row==14) {
        cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    }
    else if (indexPath.row==self.dataArr.count-3||indexPath.row==self.dataArr.count-6)
    {
        cell.backgroundColor = [UIColor clearColor];
    }
    else
    {
        cell.accessoryType = UITableViewCellAccessoryNone;
    }
  
}

-(MCCellInfo *)tableView:(UITableView *)tableView cellForIndexPath:(NSIndexPath *)indexPath IsHeight:(BOOL)isheight
{
    if (indexPath.row==self.dataArr.count-1)
    {
        return [MCCellInfo configForCellId:cell3 Class:[OAApproveDetailsCell3 class] Height:kFitH(85) TableView:tableView];
    }
   else if (indexPath.row==self.dataArr.count-3||indexPath.row==self.dataArr.count-6)
    {
        return [MCCellInfo configForCellId:cell2 Class:[BaseTableViewCell class] Height:kFitH(10) TableView:tableView];
    }
    return [MCCellInfo configForCellId:cell Class:[OAApproveDetailsCell class] Height:kFitH(40) TableView:tableView];
}

@end
